<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= @page_title %></title>
<link href="/stylesheets/css_test.css" rel="stylesheet" type="text/css" />
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/effects.js" type="text/javascript"></script>
<script src="js/dragdrop.js" type="text/javascript"></script>
<script src="js/controls.js" type="text/javascript"></script>
<script src="js/application.js" type="text/javascript"></script>
</head>

<body>
<div id="mainbody">
	<div id="head">
		<div id="logo">
                  <img src="/images/user/test/logo.gif" width="220" height="78"></img>
		</div>
			<div id="head_text">
				专业量表 beta
			</div>
	</div>
	<div id="main_left">
	  <div id="explanation">
						<div id="exp_title">
						</div>
<%= yield :sidebar %>
	  </div>
	</div>
		<div id="main_right">
		  <div id="speed">
					<div id="jiao1"></div>
					<div id="jiao2"></div>
					<div id="jiao3"></div>
                                            <div id="speed_in">
                                              测评中...　您已完成 <span>5%</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                              测试开始时间：9：30&nbsp;&nbsp;
                                              已用时：20分钟
                                            </div>
					<div id="jiao3"></div>
					<div id="jiao2"></div>
					<div id="jiao1"></div>
				</div>
					<div id="centent">
						<div id="jiao1"></div>
						<div id="jiao2"></div>
						<div id="jiao3"></div>
							<div id="cent_top">
							</div>
								<div id="cent_test">
										<div class="page">

<%= yield :layout %>

</div>
<script type="text/javascript">

//显示下一个子量表的题目
function showEl(elId){
  part_size = 2;

  //隐藏所有part
  for(i=0; i<part_size; i++) {
    $("part" + i).hide();
  }

  $("part" + elId).show();
}


function checkSelect111(tableIndexId){alert('hello');
	var inputs = document.getElementsByTagName("input");
	var totalValue = document.getElementById("totalStr");
	totalValue.value = "";
	for(var i=0;i<inputs.length;i++){
		var table = inputs[i];
		if(table.id != undefined & table.id.indexOf("position_input_")>-1){
			var pos = table.id.substring(table.id.lastIndexOf("_")+1);
			totalValue.value += pos + ":" + document.getElementById("answer_"+pos).value + "|";
			if(table.value=='')
			{
				if(tableIndexId!=undefined && tableIndexId!='undefined' && tableIndexId!=''){
					if(table.name!=tableIndexId)continue;
				}

				window.location.href=curURL + "#position_"+pos;
				window.alert("第" + document.getElementById("position_order_"+pos).value + "题未答!");
				totalValue.value = "";
				return false;
			}

		}
	}

	return true;

}

var curURL = window.location.href;

function nextItem(question_id,imgId,itemPosition,itemCount){
	if(imgId==0)return false;
	var answerObj = document.getElementById(imgId);
	var answer = $("question"+question_id);
	var value = document.getElementById("answervalue_"+answerObj.id).value;
	//给选择的答案赋值
	answer.value = value;

	//取消原来选中的
	var answerObjs = document.forms["testQuestionForm"].elements["itemanswers_"+question_id];
	for(var i=0;i<answerObjs.length;i++){
		var id = answerObjs[i].id;
		id= id.substring(id.indexOf("_")+1);
		document.getElementById(id).src="/lanxin/a_data/choose.gif";
	}

	//换图片
	answerObj.src="/lanxin/a_data/choose_2.gif";
	tmpAnswer = answerObj;

}

</script>
									</div>
					</div>
		</div>
</div>
<div id="foot">
</div>

</body>
</html>
